export {}

// void类型
const say = ():void => {
  console.log('ts好简单');
}
// js和ts默认返回值有区别 js默认返回undefined  ts默认返回void
const say1 = (): undefined => {
  return undefined
}

// 可选参数

const say2 = (word?: string):void => {
  if (word) {
    console.log(word);
  } else {
    console.log('没有传参')
  }
}
say2('aaa')
